package com.deshan.websys.code.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.deshan.websys.code.model.ChatRecords;

public interface ChatRecordMapper extends BaseMapper<ChatRecords> {

	@Select("select tcr.* from t_chat_records tcr " + "inner join t_visitors tv "
			+ "on tv.id = tcr.visitorId and tv.customerId = #{customerId} and tv.serviceId = #{sid} and tv.isDeleted = 0 "
			+ "where tcr.showStatus = 0 and tcr.isDeleted = 0")
	List<ChatRecords> listChatRecordsByCidAndSid(@Param("customerId") String customerId, @Param("sid") String sid);

}
